<template>
    <div class="login" :style="{backgroundImage: bgImage}">
        
        <div class="logo">
            <span class="iconfont logo-icon">&#xe600;</span>
            <p>GaZi</p>
        </div>
        <login-input></login-input>
    </div>
</template>

<script>
import LoginInput from './component/Input'

import util from '@/util/util'
import axios from 'axios'

export default {
    name: "Login",
    data () {
        return {
            bgImage: 'url('+ require('../../assets/image/bg.jpg') +')'
        }
    },
    components: {
        LoginInput
    },
    methods: {

    },
    mounted () {
        var _this = this;
        
        util.checkLogin()
        .then(function () {
            _this.$router.replace({
                path: '/'
            })
        },function () {
            console.log("验证未通过，注册或登录");
        });
    }
    
}
</script>

<style lang="stylus" scoped>
    .login
        width 100%
        height 100%
        position absolute
        top 0
        display flex
        flex-direction column
        align-items center
        .logo
            width 85%
            height 1.5rem
            display flex
            align-items center
            justify-content flex-start
            margin-top 2rem
            .logo-icon
                color white
                font-size 1rem
            p
                color white
                font-size .6rem
                margin-top .2rem
                margin-left .2rem
        
</style>


